// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

{$VERSION 3.1.0027}
{$CLEO .cs}

//-------------MAIN---------------
thread 'APCAMPHIBIUS' 
0000: NOP 

:APCAMPHIBIUS_21
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @APCAMPHIBIUS_21 
if 
   Actor.DrivingVehicleType($PLAYER_ACTOR, #BOXBURG)
else_jump @APCAMPHIBIUS_21 
03C0: 5@ = actor $PLAYER_ACTOR car 

:APCAMPHIBIUS_68
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @APCAMPHIBIUS_1180 
if 
   not Car.Wrecked(5@)
else_jump @APCAMPHIBIUS_1180 
if 
   Actor.Driving($PLAYER_ACTOR)
else_jump @APCAMPHIBIUS_1180 
0407: store_coords_to 11@ 12@ 13@ from_car 5@ with_offset 0.0 0.0 0.0 
13@ -= 1.0 
092E: get_water_height_at 11@ 12@ flag 0 store_to 10@ 
if 
  10@ > -100.0 
else_jump @APCAMPHIBIUS_68 
if 
0025:   10@ > 13@ // (float) 
else_jump @APCAMPHIBIUS_68 
wait 500 
9@ = Car.Angle(5@)
02F6: 11@ = cosine 9@ // (float) 
02F7: 12@ = sine 9@ // (float) 
11@ *= 0.01 
12@ *= 0.01 
11@ *= -1.0 
07D5: set_car 5@ velocity_in_direction_XYZ 11@ 12@ 0.01 rotation_velocitiesXY 0.0 0.0 unk 0.0 

:APCAMPHIBIUS_302
wait 20 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @APCAMPHIBIUS_1180 
if 
   Actor.Driving($PLAYER_ACTOR)
else_jump @APCAMPHIBIUS_1180 
0407: store_coords_to 11@ 12@ 13@ from_car 5@ with_offset 0.0 0.0 0.0 
13@ -= 1.0 
092E: get_water_height_at 11@ 12@ flag 0 store_to 10@ 
if 
  10@ > -100.0 
else_jump @APCAMPHIBIUS_68 
if 
0025:   10@ > 13@ // (float) 
else_jump @APCAMPHIBIUS_68 
9@ = Car.Angle(5@)
if 
00E1:   player 0 pressed_key 16 
else_jump @APCAMPHIBIUS_547 
Car.Angle(5@) = 9@
02F6: 11@ = cosine 9@ // (float) 
02F7: 12@ = sine 9@ // (float) 
11@ *= 0.01 
12@ *= 0.01 
11@ *= -1.0 
07D5: set_car 5@ velocity_in_direction_XYZ 11@ 12@ 0.01 rotation_velocitiesXY 0.0 0.0 unk 0.0 
jump @APCAMPHIBIUS_743 

:APCAMPHIBIUS_547
if 
00E1:   player 0 pressed_key 14 
else_jump @APCAMPHIBIUS_666 
9@ = Car.Angle(5@)
9@ += 180.0 
02F6: 11@ = cosine 9@ // (float) 
02F7: 12@ = sine 9@ // (float) 
11@ *= 0.01 
12@ *= 0.01 
11@ *= -1.0 
07D5: set_car 5@ velocity_in_direction_XYZ 11@ 12@ 0.01 rotation_velocitiesXY 0.0 0.0 unk 0.0 
jump @APCAMPHIBIUS_743 

:APCAMPHIBIUS_666
02F6: 11@ = cosine 9@ // (float) 
02F7: 12@ = sine 9@ // (float) 
11@ *= 0.001 
12@ *= 0.001 
11@ *= -1.0 
07D5: set_car 5@ velocity_in_direction_XYZ 11@ 12@ 0.007 rotation_velocitiesXY 0.0 0.0 unk 0.0 

:APCAMPHIBIUS_743
if 
00E1:   player 0 pressed_key 0 
else_jump @APCAMPHIBIUS_858 
0494: get_joystick 0 data_to 0@ 1@ 8@ 3@ 
if 
  0@ == 0 
else_jump @APCAMPHIBIUS_801 
jump @APCAMPHIBIUS_858 

:APCAMPHIBIUS_801
if 
  0@ > 0 
else_jump @APCAMPHIBIUS_833 
gosub @APCAMPHIBIUS_1153 
jump @APCAMPHIBIUS_858 

:APCAMPHIBIUS_833
if 
  0 > 0@ 
else_jump @APCAMPHIBIUS_858 
gosub @APCAMPHIBIUS_1133 

:APCAMPHIBIUS_858
if 
00E1:   player 0 pressed_key 15 
else_jump @APCAMPHIBIUS_302 
Car.LockInCurrentPosition(5@) = True
0633: AS_actor $PLAYER_ACTOR exit_car 

:APCAMPHIBIUS_887
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @APCAMPHIBIUS_1180 
if 
   not Actor.InCar($PLAYER_ACTOR, 5@)
else_jump @APCAMPHIBIUS_887 
wait 500 

:APCAMPHIBIUS_931
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @APCAMPHIBIUS_1180 
if 
   not Car.Wrecked(5@)
else_jump @APCAMPHIBIUS_1180 
if and
  $ONMISSION == 0 
82BF:   not car 5@ sunk 
0202:   actor $PLAYER_ACTOR near_car 5@ radius 70.0 70.0 flag 0 
else_jump @APCAMPHIBIUS_1173 
if 
   Actor.Driving($PLAYER_ACTOR)
else_jump @APCAMPHIBIUS_1059 
if 
   Actor.InCar($PLAYER_ACTOR, 5@)
else_jump @APCAMPHIBIUS_1173 
Car.LockInCurrentPosition(5@) = False
jump @APCAMPHIBIUS_68 

:APCAMPHIBIUS_1059
if and
00E1:   player 0 pressed_key 15 
0202:   actor $PLAYER_ACTOR near_car 5@ radius 7.0 7.0 flag 0 
else_jump @APCAMPHIBIUS_931 

:APCAMPHIBIUS_1096
wait 0 
80E1:   not player 0 pressed_key 15 
else_jump @APCAMPHIBIUS_1096 
036A: put_actor $PLAYER_ACTOR in_car 5@ 
wait 500 
jump @APCAMPHIBIUS_931 

:APCAMPHIBIUS_1133
9@ += 1.0 
Car.Angle(5@) = 9@
return 

:APCAMPHIBIUS_1153
9@ -= 1.0 
Car.Angle(5@) = 9@
return 

:APCAMPHIBIUS_1173
Car.LockInCurrentPosition(5@) = False

:APCAMPHIBIUS_1180
Car.RemoveReferences(5@)
jump @APCAMPHIBIUS_21 
